﻿Imports System.ComponentModel.DataAnnotations
Imports System.ComponentModel.DataAnnotations.Schema

<Table("Banco")>
Public Class Banco
    Implements IEntity

    <Key()>
    <DatabaseGenerated(DatabaseGeneratedOption.Identity)>
    Public Property IdBanco As Integer

    <StringLength(50)>
    Public Property NombreBanco As String

    <StringLength(50)>
    Public Property Telefono As String

    <StringLength(50)>
    Public Property Direccion As String

    Public Property IdLocalidad As Integer

    <ForeignKey("IdLocalidad")>
    Public Overridable Property Localidad() As Localidad

    <NotMapped()>
    Public Property ID() As Integer Implements IEntity.ID
        Get
            Return IdBanco
        End Get
        Set(ByVal value As Integer)
            IdBanco = value
        End Set
    End Property
End Class
